﻿<%@ Page Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<DecisionMaking.BusinessLogic.Model.EnvironmentModel>" %>
<%@ Import Namespace="DecisionMaking.Domain" %>
<asp:Content ContentPlaceHolderID="TitleContent" runat="server"><%=Model == null ? "New" : "Edit"%> Environment</asp:Content>

<asp:Content ContentPlaceHolderID="MainContent" runat="server">
    <%= Html.ValidationSummary("Environment creation was unsuccessful. Please correct the errors and try again.") %>

    <% using (Html.BeginForm()) { %>
        <div>
        	<%= Html.HiddenFor(m => m.Id) %>
            <fieldset>
                <legend>Environment Information</legend>
                <p>
                    <%= Html.LabelFor(m => m.Name) %>
                    <%= Html.TextBoxFor(m => m.Name) %>
                    <%= Html.ValidationMessageFor(m => m.Name) %>
                </p>
                <p>
                    <%= Html.LabelFor(m => m.Description) %>
                    <%= Html.TextAreaFor(m => m.Description) %>
                    <%= Html.ValidationMessageFor(m => m.Description) %>
                </p>                
                <p>
                    <%= Html.LabelFor(m => m.IndependentVariable) %>
                    <%= Html.TextBoxFor(m => m.IndependentVariable) %>
                    <%= Html.ValidationMessageFor(m => m.IndependentVariable) %>
                </p>
            </fieldset>
            <fieldset>
            	<legend>Environment Settings</legend>
                <p>
                    <%= Html.LabelFor(m => m.IsPublic) %>
                    <%= Html.CheckBoxFor(m => m.IsPublic) %>
                    <%= Html.ValidationMessageFor(m => m.IsPublic) %>
                </p>
            </fieldset>
            <p>
                <input type="submit" value="<%=Model == null ? "Next" : "Save"%> " />
            </p>            
        </div>
    <% } %>
</asp:Content>